/*
 * LED.c
 *
 *  Created on: 31.01.2011
 *      Author: Tavin
 */

#ifndef LED_C_
#define LED_C_


#endif /* LED_C_ */

#include <stdint.h>

#include "LED.h"


#include "JVM_StatusCodes.h"
#include "JVM_LED.h"
#include "LED.h"


#include "JVM_StackFrame.h"
#include "JVM_Opcode.h"


uint16_t JVM_LED_on()
{
	JVM_StackFrame_t * myStackFrame;
	uint32_t ledNumber;

	myStackFrame=JVM_Opcode_getActiveStackFrame();


	ledNumber=JVM_StackFrame_popIntValue(myStackFrame);

	LED_on(ledNumber);


	return(STCD_OK);
}




uint16_t JVM_LED_off()
{
	JVM_StackFrame_t * myStackFrame;
	uint32_t ledNumber;

	myStackFrame=JVM_Opcode_getActiveStackFrame();


	ledNumber=JVM_StackFrame_popIntValue(myStackFrame);

	LED_off(ledNumber);


	return(STCD_OK);
}






uint16_t JVM_LED_toggle()
{
	JVM_StackFrame_t * myStackFrame;
	uint32_t ledNumber;

	myStackFrame=JVM_Opcode_getActiveStackFrame();


	ledNumber=JVM_StackFrame_popIntValue(myStackFrame);

	LED_toggle(ledNumber);


	return(STCD_OK);
}
